const express = require('express');
const router = express.Router();
const commentController = require('../controllers/commentController');

// 具体路由放在前面
router.get('/article/:articleId', commentController.getArticleComments);
router.get('/user/:userId', commentController.getUserComments);

// 参数路由放在后面
router.get('/:id', commentController.getCommentById);
router.post('/', commentController.createComment);
router.put('/:id', commentController.updateComment);
router.delete('/:id', commentController.deleteComment);

module.exports = router;